@import "./variables.scss";
@import './reset.scss';
@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;
  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  } @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}
@mixin font-color($color) {
  color: $color; //默认时的color
  [data-theme="#409EFF"] & {
    color: $font-color-theme-one !important;
  }
  [data-theme="#11A983"] & {
    color: $font-color-theme-two !important;
  }
  [data-theme="#13C2C2"] & {
    color: $font-color-theme-three !important;
  }
}

@mixin bg-color($color) {
  background-color: $color; //默认时的color
  [data-theme="#409EFF"] & {
    background-color: $background-color-theme-one;
  }
  [data-theme="#11A983"] & {
    background-color: $background-color-theme-two;
  }
  [data-theme="#13C2C2"] & {
    background-color: $background-color-theme-three;
  }
}

@mixin bg-linear-gradient($color) {
  background: $color; //默认时的color
  [data-theme="#409EFF"] & {
    background: $bg-linear-gradient-theme-one;
  }
  [data-theme="#11A983"] & {
    background: $bg-linear-gradient-theme-two;
  }
  [data-theme="#13C2C2"] & {
    background: $bg-linear-gradient-theme-three;
  }
}

@mixin border-color($num, $type, $color) {
  border: $num $type $color; //默认时的
  [data-theme="#409EFF"] & {
    border: $num $type $font-color-theme-one;
  }
  [data-theme="#11A983"] & {
    border: $num $type $font-color-theme-two;
  }
  [data-theme="#13C2C2"] & {
    border: $num $type $font-color-theme-three;
  }
}

@mixin borderbottom-color($num, $type, $color) {
  border-bottom: $num $type $color; //默认时的

  [data-theme="#409EFF"] & {
    border-bottom: $num $type $font-color-theme-one;
  }

  [data-theme="#11A983"] & {
    border-bottom: $num $type $font-color-theme-two;
  }

  [data-theme="#13C2C2"] & {
    border-bottom: $num $type $font-color-theme-three;
  }
}

@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;
  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  } @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}
